Skip to main content
POST
/
api
/
portrait
/
editing
/
try-on-clothes-pro
Try on Clothes Pro
curl --request POST \
  --url https://www.ailabapi.com/api/portrait/editing/try-on-clothes-pro \
  --header 'Content-Type: multipart/form-data' \
  --header 'ailabapi-api-key: <api-key>' \
  --form task_type=async \
  --form person_image='@example-file' \
  --form top_garment='@example-file' \
  --form resolution=-1 \
  --form restore_face=true \
  --form bottom_garment='@example-file'
{
  "request_id": "",
  "log_id": "",
  "error_code": 0,
  "error_code_str": "",
  "error_msg": "",
  "error_detail": {
    "status_code": 200,
    "code": "",
    "code_message": "",
    "message": ""
  },
  "task_type": "",
  "task_id": ""
}

Authorizations

ailabapi-api-key
string
header
required

API Key for authentication

Body

multipart/form-data
task_type
string

Task Type.

  • async: Asynchronous tasks.
  • Example:

    "async"

    person_image
    file

    Portrait image.

    top_garment
    file

    Upper Body Clothing Image.

    resolution
    number

    Output Image Resolution. If you need to call Try on Clothes Refiner in the future, select -1.

  • -1: Original image resolution.
  • 1024: 576x1024px.
  • 1280: 720x1280px.
  • Example:

    "-1"

    restore_face
    boolean

    Whether to Keep the Model’s Face. If you need to call Try on Clothes Refiner in the future, select true.

  • true: Keep the model’s original face.
  • false: Regenerate the model’s face.
  • Example:

    "true"

    bottom_garment
    file

    Lower Body Clothing Image.

  • If no lower body clothing image is provided, the lower body clothing effect will be randomly generated.
  • If lower body clothing is not needed (e.g., when the upper body garment is a dress), this value should be left empty.
  • Response

    200 - application/json

    Success

    The response is of type object.